using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class PT_FunctionManagerBase
    {
        public PT_FunctionManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity Insert(PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity Update(PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity UpdateWithCondition(PT_FunctionEntity obj,PT_FunctionEntity objCond)
        { 
            return (PT_FunctionEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public PT_FunctionEntity Delete(PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.Delete(obj);             
        }
 
 
        public PT_FunctionEntity DeleteWithCondition(PT_FunctionEntity objCond)
        { 
            return (PT_FunctionEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByFormName (PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"FormName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien FormName 
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByFormName (string FormName )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FormName = FormName;  
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"FormName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByFunctionId (PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"FunctionId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien FunctionId 
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByFunctionId (int FunctionId )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FunctionId = FunctionId;  
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"FunctionId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByIsActive (PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"IsActive");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsActive 
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByIsActive (bool IsActive )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.IsActive = IsActive;  
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"IsActive");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByTag (PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"Tag");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Tag 
        /// </summary>
        /// <returns>PT_FunctionEntity</returns>
        public PT_FunctionEntity DeleteByTag (string Tag )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.Tag = Tag;  
            return (PT_FunctionEntity)Adapter.DeleteByField(obj,"Tag");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public PT_FunctionEntity Select(PT_FunctionEntity obj)
        { 
            return (PT_FunctionEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_FunctionEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_FunctionEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new PT_FunctionEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new PT_FunctionEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_FunctionEntity> SelectAllLST()
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_FunctionEntity()),new PT_FunctionEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_FunctionEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_FunctionEntity(),option),new PT_FunctionEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFormName (PT_FunctionEntity obj)
        { 
            return Adapter.SelectByField(obj,"FormName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFormName (PT_FunctionEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"FormName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByFormNameLST (PT_FunctionEntity obj)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FormName"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByFormNameLST (PT_FunctionEntity obj,SelectOptions option)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"FormName",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFormName (string FormName )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FormName = FormName;  
            return Adapter.SelectByField(obj,"FormName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFormName (string FormName, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FormName = FormName;  
            return Adapter.SelectByField(obj,"FormName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByFormNameLST (string FormName )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FormName = FormName;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FormName"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FormName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByFormNameLST (string FormName, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FormName = FormName;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FormName",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFunctionId (PT_FunctionEntity obj)
        { 
            return Adapter.SelectByField(obj,"FunctionId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFunctionId (PT_FunctionEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"FunctionId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByFunctionIdLST (PT_FunctionEntity obj)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FunctionId"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByFunctionIdLST (PT_FunctionEntity obj,SelectOptions option)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"FunctionId",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFunctionId (int FunctionId )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FunctionId = FunctionId;  
            return Adapter.SelectByField(obj,"FunctionId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByFunctionId (int FunctionId, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FunctionId = FunctionId;  
            return Adapter.SelectByField(obj,"FunctionId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByFunctionIdLST (int FunctionId )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FunctionId = FunctionId;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FunctionId"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien FunctionId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByFunctionIdLST (int FunctionId, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.FunctionId = FunctionId;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"FunctionId",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (PT_FunctionEntity obj)
        { 
            return Adapter.SelectByField(obj,"IsActive");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (PT_FunctionEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IsActive",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByIsActiveLST (PT_FunctionEntity obj)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByIsActiveLST (PT_FunctionEntity obj,SelectOptions option)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IsActive",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (bool IsActive )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.IsActive = IsActive;  
            return Adapter.SelectByField(obj,"IsActive");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (bool IsActive, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.IsActive = IsActive;  
            return Adapter.SelectByField(obj,"IsActive",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByIsActiveLST (bool IsActive )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.IsActive = IsActive;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByIsActiveLST (bool IsActive, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.IsActive = IsActive;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTag (PT_FunctionEntity obj)
        { 
            return Adapter.SelectByField(obj,"Tag");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTag (PT_FunctionEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Tag",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByTagLST (PT_FunctionEntity obj)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Tag"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectByTagLST (PT_FunctionEntity obj,SelectOptions option)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Tag",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTag (string Tag )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.Tag = Tag;  
            return Adapter.SelectByField(obj,"Tag");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTag (string Tag, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.Tag = Tag;  
            return Adapter.SelectByField(obj,"Tag",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByTagLST (string Tag )
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.Tag = Tag;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Tag"),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Tag duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_FunctionEntity> SelectByTagLST (string Tag, SelectOptions option)
        { 
            PT_FunctionEntity obj = new PT_FunctionEntity();
            obj.Tag = Tag;  
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Tag",option),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectWithConditionLST (PT_FunctionEntity obj)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new PT_FunctionEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_FunctionEntity></returns>
        public List<PT_FunctionEntity> SelectWithConditionLST (PT_FunctionEntity obj,SelectOptions option)
        { 
            return  (List<PT_FunctionEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new PT_FunctionEntity());
        }

}
}
